package com.company.project.upm.generator;


import com.baomidou.mybatisplus.generator.config.DataSourceConfig;
import com.base.springboot.starter.mybatisplus.util.MybatisPlusCodeGenerator;

/**
 * Mybatis Plus 自动代码生成MAIN
 *
 * @author admin
 * @date 2020/9/3 上午10:32
 */
public class AutoCodeMain {
    public static void main(String[] args) {
        String packagePath = "com.company.project.upm";
        String modelNameTmp = "upm";
        DataSourceConfig dataSourceConfig = new DataSourceConfig();
        dataSourceConfig.setUrl("jdbc:mysql://101.200.40.194:3306/upm?useUnicode=true&characterEncoding=utf8&autoReconnect=true&useSSL=false&allowMultiQueries=true&serverTimezone=Asia/Shanghai");
        dataSourceConfig.setUsername("root");
        dataSourceConfig.setPassword("Yzbwx931210,.");

        try {
            MybatisPlusCodeGenerator.autoGenerator(modelNameTmp, packagePath, dataSourceConfig, args);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}